/*********************************************************
	Project:		
	File name:	clock.h
	Description:	

*********************************************************/
ext     UCharField 				ClockFlag;
	#define F_HalfSecond		ClockFlag.field.B0
	#define F_HalfSecondBackup	ClockFlag.field.B1
	#define F_HalfSecondOut		ClockFlag.field.B2
	#define F_Clock_Display		ClockFlag.field.B3
	#define F_IR_HasKey			ClockFlag.field.B4
	#define F_TOSHIBAR_Remote	ClockFlag.field.B5
typedef struct
{
	unsigned char sec;
	unsigned char min;
	unsigned char hour;
	unsigned char day;
	unsigned char date;
	unsigned char month;
	unsigned char year;
} ClockStruct;

#pragma section @tiny [nochange]
ext  SPTINY  ClockStruct Clock;
#pragma section @tiny []

ext  uchar clock_minold;
ext   uword  n1stick;
#define HOUR_KEEP	0xC0
#define HOUR_UP		0x80
#define HOUR_DOWN	0x40

#define MIN_KEEP	0xC0
#define MIN_UP		0x80
#define MIN_DOWN	0x40
#ifdef D_DATE_CALCDAY
#define _IsLeapYear(_Year_)	(((0 == (_Year_ % 4)) && (0 != (_Year_ % 100))) || (0 == (_Year_ % 400)))
extern uchar GetClockDay(int wYear,unsigned char bMonth,unsigned char bDate);
#endif
extern void ClockChange(unsigned char hour,unsigned char min);

extern uchar getDayNumber(uchar year_up2000, uchar month) ;
extern void  _10ms_Tick_Pro(void);
extern void _100ms_Tick_Pro(void);
extern void _1s_Tick_Pro(void);
#ifndef SUPPORT_RTC
extern void _4ms_tick_clockset(void);

#endif

/*********************************************************
				File End
*********************************************************/

